﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Drawing;
using System.Data;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace SksApp
{
    public partial class MainMenu : UserControl
    {
        public enum Menu
        {
            Pos, Urun, Cari, Rapor, Cikis, Ayarlar
        }

        public delegate void MessageHandler(Menu sender);
        public event MessageHandler MessageReceived;

        public MainMenu()
        {
            InitializeComponent();
            this.BackColor = Color.Transparent;
            this.Size = new Size(528, 398);
        }

        private void btnMouseDown(object sender, MouseEventArgs e)
        {
            PictureBox pc = sender as PictureBox;
            pc.BorderStyle = BorderStyle.Fixed3D;
        }
        private void btnMouseUp(object sender, MouseEventArgs e)
        {
            PictureBox pc = sender as PictureBox;
            pc.BorderStyle = BorderStyle.None;
        }

        private void btnPos_Click(object sender, EventArgs e)
        {
            if (MessageReceived != null)
                MessageReceived(Menu.Pos);
        }

        private void btnUrunler_Click(object sender, EventArgs e)
        {
            if (MessageReceived != null)
                MessageReceived(Menu.Urun);
        }

        private void btnMusteri_Click(object sender, EventArgs e)
        {
            if (MessageReceived != null)
                MessageReceived(Menu.Cari);
        }

        private void btnRapor_Click(object sender, EventArgs e)
        {
            if (MessageReceived != null)
                MessageReceived(Menu.Rapor);
        }

        private void btnAyarlar_Click(object sender, EventArgs e)
        {
            if (MessageReceived != null)
                MessageReceived(Menu.Ayarlar);
        }

        private void btnCikis_Click(object sender, EventArgs e)
        {
            if (MessageReceived != null)
                MessageReceived(Menu.Cikis);
        }
    }
}
